package dsk.demo.miaosha.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class DemoController {

    @RequestMapping("/demo/hello")
    public String test(Model model) {
        model.addAttribute("name","戴世坤");
        return "hello";
    }

    @RequestMapping("/demo/haha")
    @ResponseBody
    public String haha() {
        return "haha";
    }
}
